Skip to content

Feature/apple silicon support -> main#13

Open
alangnt wants to merge 4 commits intofacebookresearch:mainfrom
alangnt:feature/apple-silicon-support
Open

Feature/apple silicon support -> main#13
alangnt wants to merge 4 commits intofacebookresearch:mainfrom
alangnt:feature/apple-silicon-support

Conversation

@alangnt
Copy link
Copy Markdown

@alangnt alangnt commented Mar 29, 2026

Hi everyone and thank you for reading my PR !

Here's a summary of what it does :

  • Override extractor devices to CPU via config when CUDA is unavailable, so extractors are built with the correct device from the start
  • Fix whisperx (ctranslate2) compatibility: fall back to CPU with int8 compute type since it does not support MPS
  • Add "Running on Apple Silicon" section to README with working example including the required multiprocessing.set_start_method("fork") workaround

Here's the test plan :

  • Tested end-to-end inference on Apple Silicon M4 (macOS) with a video file
  • Verified feature extraction (LLaMA 3.2, V-JEPA2, Wav2Vec-BERT) and brain prediction complete successfully
  • Verified plotting output (brain_activity.png) renders correctly
  • Verify no regression on Linux/CUDA: all changes check torch.cuda.is_available() first, so CUDA environments are unaffected

Tested on MacBook Pro M4 Pro

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 29, 2026
orenhaliva pushed a commit to orenhaliva/tribev2 that referenced this pull request Apr 11, 2026
- Auto-detect MPS device in from_pretrained
- Route all extractors (text, audio, video) to MPS when available
- Builds on PR facebookresearch#13 patches for basic Mac support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant